import { Application } from 'egg';

export default (app: Application) => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;
    const businessCateSchema = new Schema({
        name: { type: String, unique: true, required: true },
        weight: { type: Number, required: true, default: 0 },
        createDate: { type: Date },
        updateDate: { type: Date },
    });
    return mongoose.model('BusinessCate', businessCateSchema);
};
